package me.qi.kancha.dto.core;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import me.qi.kancha.dto.base.BaseDTO;
import me.qi.kancha.dto.enums.ArticleStatus;

import java.io.Serializable;
import java.util.Date;

/**
 * 文章表
 * @author qi
 * @date 2022-10-26 01:43:51
 * @TableName article
 */
@TableName(value ="article")
@Data
public class ArticleDTO extends BaseDTO implements Serializable {

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 删除标记
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    @TableLogic(value = "0", delval = "1")
    private Integer deleted;

    /**
     * 状态(1正常，2锁定)
     */
    private ArticleStatus status;

    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 浏览量
     */
    @TableField(value = "view")
    private Integer view;

    /**
     * 主题图片
     */
    @TableField(value = "img")
    private String img;

    /**
     * 内容纯文本概要
     */
    @TableField(value = "content_txt")
    private String contentTxt;

    /**
     * 一级分类
     */
    @TableField(value = "type1")
    private String type1;

    /**
     * 二级分类
     */
    @TableField(value = "type2")
    private String type2;

    /**
     * 来源
     */
    @TableField(value = "source")
    private String source;
}